package com.jz.digital.main;

import com.jz.digital.base.BasePresenter;
import com.jz.digital.bean.UserInfo;
import com.jz.digital.utils.AccountManagerHelper;
import com.jz.digital.utils.GreenDaoUtils;

/**
 * @author jiangdz
 * @date 2024/11/14
 * 用途:
 */
public class MainPresenter extends BasePresenter<IMainView> {
    /**
     * 初始化配置
     */
    public void initConfig() {
        UserInfo userInfo = GreenDaoUtils.getUserInfo(AccountManagerHelper.getInstance().getUserId());
        if (userInfo != null && userInfo.getPermissionList() != null && isAttachView()) {
            getView().onPermissionBean(userInfo.getPermissionList());
        }
    }
}
